#!/bin/sh
mkdir ~/logs
grep '^(EE)' -rsh /var/log > ~/errors.log
sleep 5s
grep -E '\/[[:alnum:]]' ~/errors.log
sleep 5s
grep '(EE)\|(WW)' /var/log/Xorg.0.log | sed s/EE/Ошибка/g | sed s/WW/Предупреждение/g | sort > ~/logs/full.log
sleep 5s
grep -r -E -o -h -s -I '[a-zA-z0-9]+@([a-zA-Z0-9]+\.)+[a-zA-Z]{2,3}' /etc/ | sort | uniq | tr '\n' ',' > ~/emails.list
sleep 5s
grep -E -r -h '^#!/bin/[[:alnum:]]{2,5}' /bin/ | sort | uniq --count | sed 2,/^$/d | tr '[:digit:]' ' '
